import { Controller } from 'egg';
export default class UserController extends Controller {
  public async create() { //登录
    const { ctx } = this; 
    const data =  await ctx.service.api.users.login(ctx.request.body);
    ctx.body=data;
    ctx.status=data.status;
  }
  public async index() { //获取用户信息
    const { ctx } = this; 
    const data =  await ctx.service.api.users.userinfo(ctx.query);
    ctx.body=data;
    ctx.status=200;
  }
}
